package com.wpre.springconfigs.controller;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-10-27
 * Time: 22:34
 */
@RestController
public class ymlController {


    @Value("${spring.datasource.url}")
    private String url;

    @Value("${spring.datasource.username}")
    private String username;



    @PostConstruct
    public void readValue() {
        System.out.println(url);
    }

}
